#### QUICK TESTING SEARCHING QUERIES #####

# a small function library for analyzing the companies that result from a set of product queries

# load required libraries
library(XML) # install.packages('XML')
library(stringr) # install.packages('stringr')
library(plyr) # install.packages('plyr')
library(googleVis) #install.packages('googleVis')

# sources functions for quick analysis
source('./functionLibrary_QT.R')

# FIRST build data object from the search query file
# 
# first parameter (searchTableLoc) tells the program what searches to perform for what product
# second parameter tells program where to save output
#
buildDataObject(searchTableLoc='./prodAlgoTable.csv',  dataObjectOutputLoc='./searchData.RData')

# THEN perform quick analysis of the resulting companies and their unique # of locations
# note: the 'numOfCompanies' variable dictates how many companies are listed per product
quickReport.byProduct(dataInputObjectLoc='./searchData.RData',outputChartLoc='./outputCharts.html',numOfCompanies=25)